//
//  SMHFriendCell.swift
//  SMHCommerce
//
//  Created by lvzhao on 2020/6/6.
//  Copyright © 2020 lvzhao. All rights reserved.
//

import UIKit

class SMHFriendCell: LZBaseTableViewCell {

    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        setupUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    

    //MARK : setupUI
    func setupUI(){
        
        self.contentView.addSubview(self.nameLab)
        self.nameLab.snp.makeConstraints { (make) in
            make.left.equalTo(15)
            make.width.equalTo(100)
            make.height.equalTo(self.contentView)
            make.centerY.equalTo(self.snp.centerY)
        }
        
        
        self.contentView.addSubview(self.phoneNumLab)
        self.phoneNumLab.snp.makeConstraints { (make) in
             make.left.equalTo(120)
             make.width.equalTo(110)
             make.height.equalTo(self.contentView)
             make.centerY.equalTo(self.snp.centerY)
        }
        
        self.contentView.addSubview(self.wechatNumLab)
        self.wechatNumLab.snp.makeConstraints { (make) in
            make.left.equalTo(235)
            make.right.equalTo(10)
            make.height.equalTo(self.contentView)
            make.centerY.equalTo(self.snp.centerY)
        }
        self.lineView.isHidden = false
        
    }
    
    
    
    var modelObject : Any?{
        didSet{
            self.nameLab.text = "你好.我的un想"
            self.phoneNumLab.text = "2888388374848"
            self.wechatNumLab.text = "2888388374848"
        }
    }
    
    
    //MARK:昵称
    lazy var nameLab : UILabel = {
        
        let nameLab = UILabel()
        nameLab.textColor = UIColorFromHex(rgbValue: 0x363636)
        nameLab.font = ktextFont(size: 14)
        nameLab.adjustsFontSizeToFitWidth = true
        return nameLab
    }()
    
    //MARK:电话
    lazy var phoneNumLab : UILabel = {
        
        let phoneNumLab = UILabel()
        phoneNumLab.textColor = UIColorFromHex(rgbValue: 0x363636)
        phoneNumLab.font = ktextFont(size: 14)
        phoneNumLab.adjustsFontSizeToFitWidth = true
        return phoneNumLab
    }()
    
    //MARK:微信
    lazy var wechatNumLab : UILabel = {
        
        let wechatNumLab = UILabel()
        wechatNumLab.textColor = UIColorFromHex(rgbValue: 0x363636)
        wechatNumLab.font = ktextFont(size: 14)
        wechatNumLab.adjustsFontSizeToFitWidth = true
        return wechatNumLab
    }()
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
